#ifndef SYSUSER_H
#define SYSUSER_H

#include <QString>
#include <QByteArray>
#include <QDate>
#include <QVariantMap>

struct SysUser
{
    QString id = "0";
    QString avatar;       // Base64格式头像
    QString signature;
    QString account;
    QString name;
    QString nickname;
    QString gender;
    int age = 0;
    QDate birthday;
    QString nation;
    QString nativePlace;
    QString email;
    QString phone;
    QString orgName;
    QString positionName;

    // 转换为QVariantMap
    QVariantMap toVariantMap() const
    {
        return
        {
            {"id", id},
            {"avatar", avatar},
            {"signature", signature},
            {"account", account},
            {"name", name},
            {"nickname", nickname},
            {"gender", gender},
            {"age", age},
            {"birthday", birthday.toString("yyyy-MM-dd")},
            {"email", email},
            {"phone", phone},
            {"orgName", orgName},
            {"positionName", positionName}
        };
    }
};

#endif // SYSUSER_H
